import React, { memo } from 'react'
import { Provider } from 'react-redux'
import { renderRoutes } from 'react-router-config'
import { HashRouter } from 'react-router-dom'

import routes from './router'

import Header from '@/components/app-header'
import Footer from '@/components/app-footer'
import store from './store/index'

export default memo(function App() {
  return (
    <Provider store={store}>
      <HashRouter>
        <Header />
        {/* 路由出口 */}
        {renderRoutes(routes)}
        <Footer />
      </HashRouter>
    </Provider>

  )
})

